<template>
  <div class="bt-warning">
     <span @click=" visible = true" class="edit" v-if="_SHOWBTN(showBetCode4)">启用</span>
    <el-dialog width="432px" title="状态提示" :visible.sync="visible">
      <i>
        <img src="@/assets/image/Shape.png" alt />
      </i>
      <div class="text">
        <p class="first">确定启用此角色？</p>
        <!-- <p class="second">该角色设置为停用，管理员将不具有此角色</p> -->
      </div>

      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="start">确 定</el-button>
        <el-button type="cancel" @click=" visible = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
     props: ["title","id","click","showBetCode4"],
  data() {
    return {
      visible: false
    };
  },
  methods:{
start(id) {
      this.visible = false;
      this.Api.startRole({
        id: this.id,
      }).then((res) => {
        console.log(res);
        this.click();
      });
    },
  }
};
</script>
<style lang="less" scoped>
/deep/.el-button--deleteAll {
  width: 80px;
  height: 36px;
  background: rgba(255, 255, 255, 1);
  border-radius: 3px;
  border: 1px solid rgba(251, 54, 63, 1);
  padding: 0;
  color: #fb363f;
}
/deep/.el-dialog {
  margin-top: 19% !important;
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  > .el-dialog__header {
    padding-right: 255px;
    padding-bottom: 0;
    background: none;
    > span {
      font-size: 16px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: rgba(0, 0, 0, 0.85);
      line-height: 24px;
    }
  }
  > .el-dialog__body {
    padding-left: 70px;
    padding-top: 12px;
    padding-bottom: 24px;
    position: relative;
    > i {
      position: absolute;
      left: 32px;
      top: -22px;
    }
    > span {
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(102, 102, 102, 1);
    }
  }
  > .el-dialog__footer {
    .el-button--primary {
      width: 65px;
      height: 32px;
      background: rgba(22, 119, 255, 1);
      padding: 0;
      color: white;
    }
    .el-button--cancel {
      width: 65px;
      height: 32px;
      background: rgba(250, 250, 250, 1);
      border: 1px solid rgba(221, 221, 221, 1);
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(102, 102, 102, 1);
      padding: 0;
      margin-left: 8px;
    }
  }
}
.edit {
  display: block;
  color: #1677ff;
  font-size: 14px;
  border-left: none;
  width: 48px;
  height: 14px;
  text-align: center;
  line-height: 14px;
  border-left: 1px solid #dddddd;
}
/deep/.el-icon-close:before {
  content: "";
}
.text {
  text-align: left;
}
.first {
  font-size: 14px;
  color: #666666;
}
.second {
  font-size: 12px;
  color: #999999;
}
</style>